#ifndef IPPACKET_H
#define IPPACKET_H
#include "ip.h"

struct ip_print_demux_state {
    const struct ip *_ip;
    const u_char *cp;
    u_int   len, off;
    u_char  nh;
    int     advance;
};

class IPPacket
{
    struct ip_print_demux_state  ipd;
    u_int length;
    char *packet_end;

    void tcp_dissection(const u_char *tcp_begin, u_int len, const u_char *ip, u_int fragmented);
    void ip_demux();

public:
    IPPacket(u_char *head, u_int len);
    int dissection();
    int print_ipheader();
};

#endif // IPPACKET_H
